//
//  MessageTelephoneView.m
//  UI_09homework
//
//  Created by dllo on 16/6/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MessageTelephoneView.h"

@interface MessageTelephoneView ()

@property(nonatomic,retain)UILabel *label;
@property(nonatomic, retain)UIImageView *imageView;
@property(nonatomic, retain)UITextField *textField;


@end





@implementation MessageTelephoneView

-(void)dealloc{
    [_label release];
    [_imageView release];
    [_textField release];
    [super dealloc];
}


-(instancetype)initWithFrame:(CGRect)frame withImageName:(NSString *)imageName withLabelText:(NSString *)labelText
{
    
    if (self = [super initWithFrame:frame]) {
        
        
        self.imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, CGRectGetHeight(self.bounds) / 8, CGRectGetWidth(self.bounds) / 7 * 2, CGRectGetHeight(self.bounds) / 2)];
        self.imageView.image = [UIImage imageNamed:imageName];
        
        
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetWidth(self.bounds) / 5 * 2, 0, CGRectGetWidth(self.bounds) / 5 * 3, CGRectGetHeight(self.bounds))];
        self.label.text = labelText;
        
        
        [self addSubview:self.imageView];
        [self addSubview:self.label];
        
        [_imageView release];
        [_label release];
        
                
    }
    
    
    return self;
}
















@end
